package com.starlink.controller.wechat;

import com.starlink.common.WebResponse;
import com.starlink.common.annotation.WebAccess;
import com.starlink.model.request.BannerRequest;
import com.starlink.model.vo.BannerVO;
import com.starlink.service.BannerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author zhanghong
 */
@RestController
@RequestMapping("/wechat/banner")
@Api(value = "【小程序端】banner模块", tags = {"【小程序端】banner模块"})
public class WechatBannerController {

    @Autowired
    private BannerService bannerService;

    @ApiOperation("列表查询")
    @PostMapping("/listQuery")
    public WebResponse<List<BannerVO>> listQuery(@RequestBody BannerRequest request) {
        return WebResponse.build(bannerService.listQuery(request));
    }

}
